package org.fg.logcommon.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CommonAutoConfiguration {

//    String POINTCUT = "(within( org.fg..controller..*)) " +
//            "&& (execution(* org.fg..controller..*Controller..*(..)))";

    @Bean
    public HeaderCheckInterceptor headerCheckInterceptor() {
        return new HeaderCheckInterceptor();
    }

    @Bean
    public WebConfig webConfig() {
        return new WebConfig();
    }

//    @Bean
//    public AppInitActions initActions() {
//        return new AppInitActions();
//    }

//
//    @Bean
//    public AsyncTaskExecuteAspect originAsyncTaskExecuteAspect() {
//        return new AsyncTaskExecuteAspect();
//    }
//
//    @Bean
//    public PointcutAdvisor asyncTaskExecuteAspect(AsyncTaskExecuteAspect originAsyncTaskExecuteAspect) {
//        DynamicPointcutAdvisor pointcutAdvisor = new DynamicPointcutAdvisor(POINTCUT);
//        pointcutAdvisor.setAdviceBeanName("asyncTaskExecuteAspect");
//        pointcutAdvisor.setAdvice(originAsyncTaskExecuteAspect);
//        pointcutAdvisor.setOrder(AspectOrder.ASYNC_TASK_EXECUTE_ASPECT_ORDER);
//        return pointcutAdvisor;
//    }

}
